package com.code.manager;

import com.code.model.ResponseUtil;
import com.github.lianjiatech.retrofit.spring.boot.annotation.RetrofitClient;
import retrofit2.Call;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.POST;

/**
 * 接口必须使用@RetrofitClient注解标记！
 * <p>
 * 可以参考 <a href="https://github.com/LianjiaTech/retrofit-spring-boot-starter">retrofit-spring-boot-starter</a>
 *
 * @author tangyifei
 */
@RetrofitClient(baseUrl = "${verify.token.url}")
public interface HttpApi {

    /**
     * 验证token
     *
     * @param token 登录token
     * @return 验证结果
     */
    @Headers({
            "Accept: application/json; charset=UTF-8"
    })
    @POST("/financial-app/user/verifyToken")
    Call<ResponseUtil> verifyToken(@Header("token") String token);

}
